﻿<phone:PhoneApplicationPage 
    x:Class="Axa.CasinoApp.Client.WP7.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="LandscapeLeft"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="728"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="CasinoApp" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Settings" Margin="9,-20,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - zusätzliche Inhalte hier platzieren-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,-10,12,0">
            
            <Grid.RowDefinitions>
                <RowDefinition Height="70"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <TextBlock Grid.Row="0" Foreground="Gray" Margin="10 0 0 0">
                Use backend
            </TextBlock>
            <CheckBox Grid.Row="0" Grid.Column="2" Name="useBackendChk" IsChecked="{Binding Path=UseBackend, Mode=TwoWay}" />
            <TextBlock Grid.Row="1" Foreground="Gray" Margin="10 0 0 0">
                Number of players
            </TextBlock>
            <Slider LargeChange="1" SmallChange="1" 
                    Maximum="10" Minimum="1" 
                    Name="numberOfPlayersSlider"
                    Grid.Row="2" Grid.ColumnSpan="2" Foreground="White"
                    IsEnabled="{Binding ElementName=useBackendChk, Path=IsChecked}"
                    Value="{Binding Path=NumberOfPlayers, Mode=TwoWay}" VerticalAlignment="Center"/>
            <TextBox Name="numberOfPlayersTxt" 
                     Text="{Binding ElementName=numberOfPlayersSlider, Path=Value}" 
                     IsEnabled="True" VerticalContentAlignment="Top" HorizontalContentAlignment="Right"
                     Grid.Row="2" Grid.Column="2"  
                     BorderThickness="1" />
            <TextBlock Grid.Row="3" Foreground="Gray" Margin="10 0 0 0">
                Backend Url
            </TextBlock>
            <TextBox Name="backendUrlTxt"
                     Grid.Row="4" Grid.ColumnSpan="3" Grid.Column="0"
                     IsEnabled="{Binding ElementName=useBackendChk, Path=IsChecked}"
                     Text="{Binding Path=BackendUrl, Mode=TwoWay}"/>

            <Button Name="returnBtn" Click="returnBtn_Click"
                    Content="Return"
                    Grid.Row="6" Grid.Column="1"/>
            
            <Button Name="startBtn" Click="startBtn_Click"
                    Content="Start"
                    Grid.Row="6" Grid.Column="2"/>
        </Grid>
    </Grid>
 
    <!--Beispielcode zur Verwendung von ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Schaltfläche 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Schaltfläche 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Menüelement 1"/>
                <shell:ApplicationBarMenuItem Text="Menüelement 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
